#include<iostream>
#include<queue>


int main()
{
    //默认最大堆
    //添加如下参数变成最小堆
    std::priority_queue<int,std::vector<int>,std::greater<int>> q;
    for(int i=0;i<10;i++)
    {
        q.push(i+1);
    }
    while(!q.empty())
    {
        std::cout<<q.top()<<" ";
        q.pop();
    }
    std::cout<<std::endl;



    return 0;
}